/*
 * OpLab.h
 *
 *  Created on: Apr 2, 2010
 *      Author: Sequoyha
 */

#ifndef OPLAB_H_
#define OPLAB_H_

#include<iostream>
#include<iomanip>
using namespace std;

class Fraction
{
	friend istream &operator >>(istream& input, Fraction& frac);
	friend ostream& operator <<(ostream& output, Fraction& frac);
public:
	Fraction();
	Fraction(int);
	Fraction(int, int);
	void setNumerator(int);
	void setDenominator(int);
	int GetNumer();
	int GetDenom();
	Fraction operator+(const Fraction& obj);
	Fraction operator-(const Fraction& obj);
	Fraction operator*(const Fraction& obj);
	Fraction operator/(const Fraction& obj);
	Fraction operator=(const Fraction& obj);
	bool operator<(const Fraction& obj);
	bool operator<=(const Fraction& obj);
	bool operator>(const Fraction& obj);
	bool operator>=(const Fraction& obj);
	bool operator==(const Fraction& obj);
	bool operator!=(const Fraction& obj);
	void Normalize();
	int Gcd(int numer, int denom);
	int Compare(const Fraction& f);// const;
private:
	int numerator;
	int denominator;
};

#endif /* OPLAB_H_ */
